﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace BasicComponents.Model
{
    public class DygxClass : ICloneable, INotifyPropertyChanged
    {
        String dbFieldDM = "";
        String dbFieldName = "";
        String xlsColName = "";
        ObservableCollection<String> xlsColList = new ObservableCollection<string>();

        public string DBFieldDM
        {
            get => dbFieldDM; set
            {
                dbFieldDM = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("DBFieldDM"));
                }
            }
        }
        public string DBFieldName
        {
            get => dbFieldName; set
            {
                dbFieldName = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("DBFieldName"));
                }
            }
        }
        public string XlsColName
        {
            get => xlsColName; set
            {
                xlsColName = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("XlsColName"));
                }
            }
        }
        public ObservableCollection<string> XlsColList
        {
            get => xlsColList; set
            {
                xlsColList = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("XlsColList"));
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        public object Clone()
        {
            return this.MemberwiseClone();
        }
    }
}
